.class Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;
.super Landroid/widget/LinearLayout;
.source "FollowList.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcn/sharesdk/onekeyshare/FollowList;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "PRTHeader"
.end annotation


# instance fields
.field private ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

.field private pbRefreshing:Landroid/widget/ProgressBar;

.field private tvHeader:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 14
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/16 v11, 0x10

    const/4 v10, 0x1

    const/4 v9, -0x2

    .line 462
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 463
    invoke-virtual {p0, v10}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->setOrientation(I)V

    .line 465
    new-instance v2, Landroid/widget/LinearLayout;

    invoke-direct {v2, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 466
    .local v2, "llInner":Landroid/widget/LinearLayout;
    new-instance v3, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v3, v9, v9}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 468
    .local v3, "lpInner":Landroid/widget/LinearLayout$LayoutParams;
    iput v10, v3, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 469
    invoke-virtual {p0, v2, v3}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 471
    new-instance v7, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    invoke-direct {v7, p1}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;-><init>(Landroid/content/Context;)V

    iput-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    .line 472
    const-string v7, "ssdk_oks_ptr_ptr"

    invoke-static {p1, v7}, Lcn/sharesdk/framework/utils/R;->getBitmapRes(Landroid/content/Context;Ljava/lang/String;)I

    move-result v6

    .line 473
    .local v6, "resId":I
    if-lez v6, :cond_2d

    .line 474
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    invoke-virtual {v7, v6}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setImageResource(I)V

    .line 476
    :cond_2d
    const/16 v7, 0x20

    invoke-static {p1, v7}, Lcn/sharesdk/framework/utils/R;->dipToPx(Landroid/content/Context;I)I

    move-result v1

    .line 477
    .local v1, "dp_32":I
    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v4, v1, v1}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 478
    .local v4, "lpIv":Landroid/widget/LinearLayout$LayoutParams;
    iput v11, v4, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 479
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    invoke-virtual {v2, v7, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 481
    new-instance v7, Landroid/widget/ProgressBar;

    invoke-direct {v7, p1}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;)V

    iput-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->pbRefreshing:Landroid/widget/ProgressBar;

    .line 482
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->pbRefreshing:Landroid/widget/ProgressBar;

    invoke-virtual {v2, v7, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 483
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->pbRefreshing:Landroid/widget/ProgressBar;

    const/16 v8, 0x8

    invoke-virtual {v7, v8}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 485
    new-instance v7, Landroid/widget/TextView;

    invoke-virtual {p0}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->getContext()Landroid/content/Context;

    move-result-object v8

    invoke-direct {v7, v8}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    .line 486
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    const/high16 v8, 0x41900000

    invoke-virtual {v7, v10, v8}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 487
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    const/16 v8, 0x11

    invoke-virtual {v7, v8}, Landroid/widget/TextView;->setGravity(I)V

    .line 488
    invoke-virtual {p0}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->getContext()Landroid/content/Context;

    move-result-object v7

    const/16 v8, 0xa

    invoke-static {v7, v8}, Lcn/sharesdk/framework/utils/R;->dipToPx(Landroid/content/Context;I)I

    move-result v0

    .line 489
    .local v0, "dp_10":I
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    invoke-virtual {v7, v0, v0, v0, v0}, Landroid/widget/TextView;->setPadding(IIII)V

    .line 490
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    const/high16 v8, -0x1000000

    invoke-virtual {v7, v8}, Landroid/widget/TextView;->setTextColor(I)V

    .line 491
    new-instance v5, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v5, v9, v9}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 493
    .local v5, "lpTv":Landroid/widget/LinearLayout$LayoutParams;
    iput v11, v5, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 494
    iget-object v7, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    invoke-virtual {v2, v7, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 495
    return-void
.end method


# virtual methods
.method public onPullDown(I)V
    .registers 7
    .param p1, "percent"    # I

    .prologue
    const/16 v4, 0x64

    .line 498
    if-le p1, v4, :cond_2c

    .line 499
    add-int/lit8 v2, p1, -0x64

    mul-int/lit16 v2, v2, 0xb4

    div-int/lit8 v0, v2, 0x14

    .line 500
    .local v0, "degree":I
    const/16 v2, 0xb4

    if-le v0, v2, :cond_10

    .line 501
    const/16 v0, 0xb4

    .line 503
    :cond_10
    if-gez v0, :cond_13

    .line 504
    const/4 v0, 0x0

    .line 506
    :cond_13
    iget-object v2, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    invoke-virtual {v2, v0}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setRotation(I)V

    .line 511
    .end local v0    # "degree":I
    :goto_18
    if-ge p1, v4, :cond_33

    .line 512
    invoke-virtual {p0}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "pull_to_refresh"

    invoke-static {v2, v3}, Lcn/sharesdk/framework/utils/R;->getStringRes(Landroid/content/Context;Ljava/lang/String;)I

    move-result v1

    .line 513
    .local v1, "resId":I
    if-lez v1, :cond_2b

    .line 514
    iget-object v2, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(I)V

    .line 522
    :cond_2b
    :goto_2b
    return-void

    .line 508
    .end local v1    # "resId":I
    :cond_2c
    iget-object v2, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setRotation(I)V

    goto :goto_18

    .line 517
    :cond_33
    invoke-virtual {p0}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "release_to_refresh"

    invoke-static {v2, v3}, Lcn/sharesdk/framework/utils/R;->getStringRes(Landroid/content/Context;Ljava/lang/String;)I

    move-result v1

    .line 518
    .restart local v1    # "resId":I
    if-lez v1, :cond_2b

    .line 519
    iget-object v2, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(I)V

    goto :goto_2b
.end method

.method public onRequest()V
    .registers 4

    .prologue
    .line 525
    iget-object v1, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setVisibility(I)V

    .line 526
    iget-object v1, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->pbRefreshing:Landroid/widget/ProgressBar;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 527
    invoke-virtual {p0}, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "refreshing"

    invoke-static {v1, v2}, Lcn/sharesdk/framework/utils/R;->getStringRes(Landroid/content/Context;Ljava/lang/String;)I

    move-result v0

    .line 528
    .local v0, "resId":I
    if-lez v0, :cond_1e

    .line 529
    iget-object v1, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->tvHeader:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(I)V

    .line 531
    :cond_1e
    return-void
.end method

.method public reverse()V
    .registers 3

    .prologue
    .line 534
    iget-object v0, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->pbRefreshing:Landroid/widget/ProgressBar;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 535
    iget-object v0, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    const/16 v1, 0xb4

    invoke-virtual {v0, v1}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setRotation(I)V

    .line 536
    iget-object v0, p0, Lcn/sharesdk/onekeyshare/FollowList$PRTHeader;->ivArrow:Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcn/sharesdk/onekeyshare/FollowList$RotateImageView;->setVisibility(I)V

    .line 537
    return-void
.end method
